<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    function a(XX){
        this.x=XX;
        return this;

    }
    var x=a(5);
    // xx=5;
    // this.x=5;this是谁 window
    // 谁调用window指向谁
    // xx=6;
    // this.x=6;
    // window.x=6;
    var y=a(6);
    console.log(x.x);//undefined
    console.log(y.x);//6
    					





    </script>
</body>
</html>